package com.li.mapper;

import com.li.pojo.po.Dept;
import com.li.pojo.po.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ReportMapper {
    /**
     * 获取线索数量
     */
    Integer getCluesNum(String beginCreateTime,String endCreateTime);

    /**
     * 获取商机数量
     */
    Integer getBusinessNum(String beginCreateTime, String endCreateTime);

    /**
     * 获取合同数量
     */
    Integer getContractNum(String beginCreateTime,String endCreateTime);



    /**
     * 获取合同金额
     */
    Integer getSalesAmount(String beginCreateTime, String endCreateTime);

    Integer getToallocatedBusinessNum(String beginCreateTime, String endCreateTime);

    Integer getTofollowedBusinessNum(String beginCreateTime, String endCreateTime);

    Integer getToallocatedCluesNum(String beginCreateTime, String endCreateTime);

    Integer getTofollowedCluesNum(String beginCreateTime, String endCreateTime);





    @Select("select dept_id from sys_dept")
    List<Integer> findAll();

    @Select("select * from sys_user where dept_id=#{id}")
    List<User> getUserList(Integer id);

    @Select("select  dept_name from sys_dept where dept_id=#{deptId}")
    String getDeptName(Integer deptId);

    Integer getBusinessNo(String nickName, String beginCreateTime, String endCreateTime);

    Integer getBusinessCount(String nickName, String beginCreateTime, String endCreateTime);

    Integer getClueNo(String nickName, String beginCreateTime, String endCreateTime);

    Integer getClueCount(String nickName, String beginCreateTime, String endCreateTime);

}
